package com.cqc.zhbjcqc.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import java.util.List;

/**
 * Created by cui on 2016/9/27.
 */

public abstract class ListViewBaseAdapter<T> extends BaseAdapter  {
    public List<T> list;
    public Context context;
    public ListViewBaseAdapter(Context context, List<T> list) {
        this.list = list;
        this.context = context;
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public Object getItem(int i) {
        return list.get(i);
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public abstract View getView(int i, View view, ViewGroup viewGroup);
}
